<template>
  {{ appStore.sidebar.opened }}
  <nav>
    <router-link to="/child01/home">Home</router-link> |
    <router-link to="/child01/test">About</router-link>
  </nav>
  <router-view/>
</template>

<script setup>
import { useAppStore } from './store/app';


const appStore = useAppStore()
// import { loadMicroApp } from 'qiankun';
// import { onBeforeUnmount, onMounted } from 'vue';
// import router from "@/router";

// let activeMicroApp = null

// onMounted(() => {
//   activeMicroApp = loadMicroApp({
//     name: 'appChild01', // app name registered
//     entry: '//localhost:7510',
//     container: '#container',
//     props: {
//       router
//     }
//   })
// })

// onBeforeUnmount(() => {
//   activeMicroApp.unmount()
// })

</script>

<style lang="less">
*{
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html, body, #app {
  height: 100%;
  overflow: hidden;
}

nav {
  padding: 30px;

  a {
    font-weight: bold;
    color: #2c3e50;

    &.router-link-exact-active {
      color: #42b983;
    }
  }
}
</style>
